import 'package:flutter/material.dart';
import 'package:leader_help/utils/util.dart';

class AreaCompeteHeader extends StatelessWidget {
  const AreaCompeteHeader({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        getSection('定位'),
        Container(
          padding: EdgeInsets.all(10.r),
          decoration: const BoxDecoration(
              border: Border(
            bottom: BorderSide(color: Colors.white),
          )),
          child: Text(
            '着力构建以先进制造业为支撑的现代产业体系，着力增强城乡区域发展协调性，着力建设绿色发展的美丽中部，着力推动内陆高水平开放，着力提升基本公共服务保障水平，着力改革完善体制机制，推动中部地区加快崛起，在全面建设社会主义现代化国家新征程中作出更大贡献。',
            style: pfMediumStyle(color: ColorsUtil.subTitle, fontSize: 14.sp),
          ),
        ),
        getSection('省份', subTitle: '6省份'),
        SizedBox(
          height: 10.r,
        )
      ],
    );
  }

  Widget getSection(String title, {String? subTitle}) {
    return Container(
      // height: 40.r,
      padding: EdgeInsets.symmetric(horizontal: 10.r),
      margin: EdgeInsets.only(top: 10.r),
      alignment: Alignment.bottomLeft,
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Container(
            width: 2.r,
            height: 12.h,
            color: ColorsUtil.red,
          ),
          SizedBox(
            width: 10.r,
          ),
          Text(
            title,
            style: pfSCStyle(color: ColorsUtil.title, fontSize: 15.sp),
          ),
          SizedBox(
            width: 20.r,
          ),
          Text(
            subTitle ?? '',
            style: pfMediumStyle(color: ColorsUtil.green, fontSize: 14.sp),
          ),
        ],
      ),
    );
  }
}
